@import '../variable.scss';

body {
    display: block!important;
    box-sizing: border-box;
}

html, body, #app, #editorBox {
    height: 100%;
    font-family: $fontFamily;
}

.editor-header {
    display: flex;
    position: fixed;
    z-index: 10;
    width: 100%;
    min-width: 1050px;
    height: 56px;
    background: #fff;
}

.editor-logo-box {
    float: left;
    height: 30px;
}

.editor-title-input {
    flex: 1;
    border: none;
    color: #000;
    font-size: 24px;
    line-height: 24px;
    font-family: $fontFamily;
    font-weight: 700;
    padding-left: 12px;
}

.editor-title-input::-webkit-input-placeholder {
    color: #999;
}

.editor-no-header-title {
    flex: 1;
}

.user-actions-box {
    width: 560px;
}

.auto-save {
    float: right;
    font-size: 16px;
    height: 26px;
    line-height: 26px;
    margin-top: 15px;
    white-space: nowrap;
    cursor: default;
    color: #ddd;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.auto-save a {
    cursor: pointer;
    margin: 0;
    margin-left: 6px;
    padding: 0 8px;
    font-size: 16px;
    line-height: 24px;
    display: inline-block;
    color: inherit;
    text-decoration: none;
    border: 1px solid currentColor;
    border-radius: 2px;
}

.auto-save a:hover {
    color: #ccc;
}

.upload-cover {
    float: right;
    margin-left: 20px;
    padding: 4px 8px;
    width: 44px;
    height: 36px;
    margin-top: 10px;
    box-sizing: border-box;
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.upload-cover-img {
    cursor: pointer;
    width: 28px;
    height: 28px;
    background-image: url(../../images/editor/uploadcover.svg);
}

.upload-cover-img2 {
    cursor: pointer;
    width: 28px;
    height: 28px;
    background-image: url(../../images/editor/uploadcover2.svg);
}

.upload-cover-img:hover {
    opacity: .8;
}

.upload-cover .panel {
    position: absolute;
    margin: 0;
    margin-right: -125px;
    margin-top: 10px;
    padding: 24px;
    top: 100%;
    right: 0;
    width: 290px;
    font-size: 14px;
    white-space: nowrap;
    color: #909090;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 2px;
    box-shadow: 0 1px 2px #f1f1f1;
    cursor: default;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    z-index: 100;
}

.upload-cover .panel:before {
    content: "";
    position: absolute;
    margin-left: 0;
    top: -8px;
    right: 137px;
    width: 16px;
    height: 16px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-right: none;
    border-bottom: none;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.upload-cover .panel .title {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 700;
    color: rgba(119, 127, 141, 0.8);
}

.upload-cover .cover-area, .upload-cover .cover-area-uploading {
    color: rgba(51, 51, 51, .4);
    background-color: hsla(0, 0%, 87%, .6);
    height: 96px;
    line-height: 96px;
    text-align: center;
    cursor: pointer;
    font-size: 16px;
}

.upload-cover .cover-area:hover:not(:disabled) {
    background-color: hsla(0, 0%, 87%, .8);
}

.cover-img-area {
    position: relative;
    min-height: 64px;
    background: #fff;
}

.cover-img-area img {
    max-width: 100%;
}

.upload-cover .delete-cover-btn {
    background: none;
    position: absolute;
    margin: 6px;
    padding: 2px 6px;
    top: 0;
    right: 0;
    font-size: 14px;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    z-index: 1;
}

.upload-cover .delete-cover-btn i {
    font-size: 16px;
}

.editor-more-btn {
    float: right;
    position: relative;
    margin-left: 10px;
    padding-left: 10px;
    padding-right: 10px;
    height: 56px;
    line-height: 56px;
}

.editor-more-btn i {
    cursor: pointer;
    color: #909090;
    font-size: 24px;
}

.editor-more-btn i:before {
    content: "\E633";
}

.switch-editor {
    position: absolute;
    margin-top: -6px;
    left: 50%;
    padding: 10px 24px;
    white-space: nowrap;
    color: #909090;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 2px;
    box-shadow: 0 1px 2px #f1f1f1;
    -webkit-transform: translate(-50%);
    -ms-transform: translate(-50%);
    transform: translate(-50%);
    cursor: pointer;
    z-index: 100;
    box-sizing: border-box;
    font-size: 14px;
    line-height: normal;
    user-select: none;
}

.switch-editor:hover {
    color: #333;
}

.switch-editor:before {
    content: "";
    position: absolute;
    margin-left: -8px;
    top: -8px;
    left: 50%;
    width: 16px;
    height: 16px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-right: none;
    border-bottom: none;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.publish-popup {
    float: right;
    margin-left: 20px;
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.publish-popup .toggle-btn {
    font-size: 16px;
    white-space: nowrap;
    color: #ea6f5a;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.publish-popup-btn {
    line-height: 56px;
}

.publish-popup .panel {
    position: absolute;
    margin: 0;
    margin-right: -30px;
    padding: 24px;
    top: 100%;
    right: 0;
    width: 336px;
    font-size: 14px;
    white-space: nowrap;
    color: #909090;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 2px;
    box-shadow: 0 1px 2px #f1f1f1;
    cursor: default;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    z-index: 100;
}

.publish-popup:hover .panel {
    display: block;
}

.publish-popup .panel:before {
    content: "";
    position: absolute;
    margin-left: -8px;
    top: -8px;
    right: 45px;
    width: 16px;
    height: 16px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-right: none;
    border-bottom: none;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.publish-popup .panel .title {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 700;
    color: rgba(119, 127, 141, 0.8);
}

.publish-popup .panel .category-box {
    margin-bottom: 10px;
}

.publish-popup .panel .sub-title {
    margin-bottom: 10px;
    font-size: 14px;
}

.publish-popup .panel .category-list, .publish-popup .panel .user-category-list {
    white-space: normal;
    font-size: 0;
}

.publish-popup .panel .category-list .item, .publish-popup .panel .user-category-list .item {
    display: inline-block;
    margin: 0;
    margin-right: 8px;
    margin-bottom: 10px;
    padding: 0 8px;
    font-size: 14px;
    white-space: nowrap;
    border: 1px solid #f1f1f1;
    border-radius: 2px;
    cursor: pointer;
    line-height: 24px;
}

.publish-popup .panel .category-list .item.active, .publish-popup .panel .category-list .item:hover {
    color: #ea6f5a;
    border-color: #f3b7ad;
    background-color: rgba(234, 111, 90, 0.08);
}

.publish-popup .panel .user-category-list .item.active, .publish-popup .panel .user-category-list .item:hover {
    color: #ea6f5a;
    border-color: #f3b7ad;
    background-color: rgba(234, 111, 90, 0.08);
}

.publish-popup .panel .publish-btn {
    display: block;
    margin: 0 auto;
    padding: 5px 16px;
    color: #ea6f5a;
    background: #fff;
    border: 1px solid currentColor;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    transition: all .2s;
}

.publish-popup .panel .publish-btn:hover:not(:disabled) {
    border-color: #ea6f5a;
    background-color: rgba(236, 97, 73, 0.05);
}

.navbar-user {
    float: right;
    margin-left: 30px;
    margin-right: 12px;
}

.category-box .ivu-select-selection {
    border-left: none!important;
    border-right: none!important;
    border-top: none!important;
    border-color: #ddd;
}

.ivu-select-visible .ivu-select-selection {
    box-shadow: none!important;
    border-color: #ddd;
}

.ivu-select-selection-focused, .ivu-select-selection:hover {
    border-color: #ddd;
}

.ivu-select-item-selected, .ivu-select-item-selected:hover {
    color: #ea6f5a;
}

.ivu-select-single .ivu-select-input {
    padding-left: 0;
    cursor: text;
}

.tag-input {
    padding-bottom: 10px;
    position: relative;
}

.tag-input input {
    padding: 2px 0;
    padding-top: 8px;
    width: 100%;
    font-size: 12px;
    border: none;
    border-bottom: 1px solid #f1f1f1;
    border-radius: 0;
    outline: none;
}

.tag-input input::-webkit-input-placeholder {
    color: #bbb;
}

.suggested-tag-list {
    max-height: 400px;
    overflow: auto;
    position: absolute;
    top: 100%;
    left: 0;
    margin: 0;
    padding: 7px 0;
    width: 192px;
    background-color: #fff;
    border: 1px solid #ddd;
    list-style: none;
    z-index: 500;
}

.suggested-tag-list li {
    padding: 7px 12px;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
    box-sizing: border-box;
}

.suggested-tag-list li:hover {
    color: #ea6f5a;
}